<!-- S 同城兑换 -->
<script type="text/javascript">

	function selectScord(scoreType){
		$('#pageNo1').attr('value','1');
		$('#scoreType').attr('value',scoreType);
		$('#sortNumber').attr('value',${sortNumber});
		$('#form1').submit();
	}
	function sort(sortNumber){
		$('#scoreType').attr('value',${scoreType});
		$('#sortNumber').attr('value',sortNumber);
		$('#form1').submit();
	}
	
	function pageNext1() {
		$('#scoreType').attr('value',${scoreType});
		$('#sortNumber').attr('value',${sortNumber});
		$('#pageNo1').attr('value',${page.pageNum+1});
		$('#form1').submit();
	}
	
	function pagePre1() {
		$('#scoreType').attr('value',${scoreType});
		$('#sortNumber').attr('value',${sortNumber});
		$('#pageNo1').attr('value',${page.pageNum-1});
		$('#form1').submit();
	}
	
	function pageSelect1() {
		$('#scoreType').attr('value',${scoreType});
		$('#sortNumber').attr('value',${sortNumber});
		$('#form1').submit();
	}
</script>
<section class="city-product">
	<div class="hd">
		<h2 class="hd-t">同城兑换</h2>
		<a href="#" target="_blank" class="hd-act">更多</a>
	</div>
	<div class="bd">
		<!-- 积分范围选择 -->
		<form id="form1" name="form1" action="${basePath}city/index.htm#A1" method="post">
			<input type="hidden" name="scoreType" id="scoreType" value="0"/>
			<input type="hidden" name="sortNumber" id="sortNumber" value="0"/>
			<div class="related-cate">
				<strong class="t">积分范围：</strong>
					<#if scoreType?exists && scoreType == "0">
						<span class="cur">
					<#else>
						<span>
					</#if><a href="javascript:void(0);" onclick="selectScord('0')" name="A1" id="A1">全部</a></span>
					<#if scoreType?exists && scoreType == "1">
						<span class="cur">
					<#else>
						<span>
					</#if><a href="javascript:void(0);" onclick="selectScord('1')">0-50积分</a></span>
					<#if scoreType?exists && scoreType == "2">
						<span class="cur">
					<#else>
						<span>
					</#if><a href="javascript:void(0);" onclick="selectScord('2')">50-100积分</a></span>
					<#if scoreType?exists && scoreType == "3">
						<span class="cur">
					<#else>
						<span>
					</#if><a href="javascript:void(0);" onclick="selectScord('3')">100-200积分</a></span>
					<#if scoreType?exists && scoreType == "4">
						<span class="cur">
					<#else>
						<span>
					</#if><a href="javascript:void(0);" onclick="selectScord('4')">200-500积分</a></span>
					<#if scoreType?exists && scoreType == "5">
						<span class="cur">
					<#else>
						<span>
					</#if><a href="javascript:void(0);" onclick="selectScord('5')">500-1000积分</a></span>
					<#if scoreType?exists && scoreType == "6">
						<span class="cur">
					<#else>
						<span>
					</#if><a href="javascript:void(0);" onclick="selectScord('6')">1000积分以上</a></span>
			</div>
		
			<!-- 排序 -->
			<div class="sorting-bar">
				<strong class="t">排序：</strong>
				<ul class="sorting-act">
					<#if sortNumber=="1">
						<li class="cur desc">
					<#else>
						<li>
					</#if>
					<a href="javascript:void(0);" onclick="sort('1')">价格</a></li>
					<#if sortNumber=="0">
						<li class="cur desc">
					<#else>
						<li>
					</#if>
					<a href="javascript:void(0);" onclick="sort('0')">上架时间</a></li>
				</ul>
			</div>
			
			<#if page?exists>
				<#if page.rows?exists>
					<ul class="clearfix city-pro-list">
						<#list page.rows as product>
							<li>
								<a href="${basePath}product/${product.id}.htm" target="_blank" class="img">
								<img src="${img_server_url + "/" + product.imageUrl1}"  /></a>
								<p class="n"><a href="${basePath}product/${product.id}.htm" target="_blank">${product.name}</a></p>
								<p class="price"><em class="s">
								<span>${product.price?default('0')}</span>积分</em></p>
							</li>
						</#list>
					</ul>
				</#if>
			
				<#if page.totalPage != 0>
					<div class="page-nav">
						<#if page.pageNum==1>
							<span class="start">上一页</span>
						<#else>
							<a href="javascript:pagePre1();" class="prev">上一页</a>
						</#if>
						
						<span class="page-info">转到
							<select id="pageNo1" name="pageNo1" onchange="pageSelect1()">
								<#if page.totalPage != 0>
									<#list 1..page.totalPage as p>
										<option <#if p==page.pageNum>selected="selected"</#if> value="${p }">${p }</option>
									</#list>
								</#if>
							</select>
							/${page.totalPage }页
						</span>
						
						<#if page.pageNum == page.totalPage>
							<span class="last">下一页</span>
						<#else>
							<a href="javascript:pageNext1();" class="next">下一页</a>
						</#if>
					</div>
				</#if>
			</#if>
		</form>
	</div>
</section>
<!-- E 同城兑换 -->